import Base from './Base'
import Question from './Question'

class Questionnaire extends Base {
  constructor ({
    id = '',
    userType = '',
    title = '',
    description = '',
    totalScore = '',
    averageScore = '',
    totalAnswered = '',
    enable = false,
    questions = [new Question({})]
  }) {
    super({id})

    this.userType = userType
    this.title = title
    this.description = description
    this.totalScore = totalScore
    this.averageScore = averageScore
    this.enable = enable
    this.questions = questions.map(v => new Question(v))
  }
}
// 静态属性
Questionnaire.$name = '/questionnaire'
export default Questionnaire
